home *** CD-ROM | disk | FTP | other *** search
-
- #define EXTERN extern
- #include "INIPGMS.h"
-
- int CurDir2DlgText( hWndDlg, ID_Text )
- HWND hWndDlg ;
- USHORT ID_Text ;
- {
-
- USHORT usDriveNum,
- usPathLen ;
- ULONG ulDriveMap ;
- CHAR Path[80] ;
-
- if( DosQCurDisk (&usDriveNum, &ulDriveMap) )
- return( -1 );
- Path[0] = (CHAR) usDriveNum + '@' ;
- Path[1] = ':' ;
- Path[2] = '\\' ;
- usPathLen = 76 ;
- if( DosQCurDir (0, Path + 3, &usPathLen) )
- return( -1 );
- if( Path[strlen(Path)-1] != '\\' ) strcat( Path, "\\" ) ;
- WinSetDlgItemText (hWndDlg, ID_Text, Path) ;
- return( 0 ) ;
-
- } /* End of CurDir2DlgText */